package com.byxy.demo01.dao;

import org.apache.ibatis.annotations.Select;

import java.util.List;

import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.ResultMap;

import com.byxy.demo01.entity.Forum;
import org.apache.ibatis.annotations.Results;
public interface ForumDao {
	@Results(id="forums",value={
			@Result(column="forum_id",property="forumId",id=true),
			@Result(column="forum_name",property="forumName"),
			@Result(column="forum_status",property="forumStatus"),
		})
	@Select("select * from forum where forum_id =#{rorumId}")
	Forum getById(Integer forumId);
	
	@ResultMap("forums")
	@Select("select * from forum")
	List<Forum> find();

}
